Integrand size = 25, antiderivative size = 281 \[ \int \frac {1}{\sqrt {e \cot (c+d x)} (a+a \cot (c+d x))^2} \, dx=-\frac {3 \arctan \left (\frac {\sqrt {e \cot (c+d x)}}{\sqrt {e}}\right )}{2 a^2 d \sqrt {e}}-\frac {\arctan \left (1-\frac {\sqrt {2} \sqrt {e \cot (c+d x)}}{\sqrt {e}}\right )}{2 \sqrt {2} a^2 d \sqrt {e}}+\frac {\arctan \left (1+\frac {\sqrt {2} \sqrt {e \cot (c+d x)}}{\sqrt {e}}\right )}{2 \sqrt {2} a^2 d \sqrt {e}}-\frac {\sqrt {e \cot (c+d x)}}{2 d e \left (a^2+a^2 \cot (c+d x)\right )}+\frac {\log \left (\sqrt {e}+\sqrt {e} \cot (c+d x)-\sqrt {2} \sqrt {e \cot (c+d x)}\right )}{4 \sqrt {2} a^2 d \sqrt {e}}-\frac {\log \left (\sqrt {e}+\sqrt {e} \cot (c+d x)+\sqrt {2} \sqrt {e \cot (c+d x)}\right )}{4 \sqrt {2} a^2 d \sqrt {e}} \]
[Out]
Time = 0.67 (sec) , antiderivative size = 281, normalized size of antiderivative = 1.00, number of steps used = 18, number of rules used = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.600, Rules used = {3650, 3734, 12, 16, 3557, 335, 303, 1176, 631, 210, 1179, 642, 3715, 65, 211} \[ \int \frac {1}{\sqrt {e \cot (c+d x)} (a+a \cot (c+d x))^2} \, dx=-\frac {3 \arctan \left (\frac {\sqrt {e \cot (c+d x)}}{\sqrt {e}}\right )}{2 a^2 d \sqrt {e}}-\frac {\arctan \left (1-\frac {\sqrt {2} \sqrt {e \cot (c+d x)}}{\sqrt {e}}\right )}{2 \sqrt {2} a^2 d \sqrt {e}}+\frac {\arctan \left (\frac {\sqrt {2} \sqrt {e \cot (c+d x)}}{\sqrt {e}}+1\right )}{2 \sqrt {2} a^2 d \sqrt {e}}-\frac {\sqrt {e \cot (c+d x)}}{2 d e \left (a^2 \cot (c+d x)+a^2\right )}+\frac {\log \left (\sqrt {e} \cot (c+d x)-\sqrt {2} \sqrt {e \cot (c+d x)}+\sqrt {e}\right )}{4 \sqrt {2} a^2 d \sqrt {e}}-\frac {\log \left (\sqrt {e} \cot (c+d x)+\sqrt {2} \sqrt {e \cot (c+d x)}+\sqrt {e}\right )}{4 \sqrt {2} a^2 d \sqrt {e}} \]
[In]
[Out]
Rule 12
Rule 16
Rule 65
Rule 210
Rule 211
Rule 303
Rule 335
Rule 631
Rule 642
Rule 1176
Rule 1179
Rule 3557
Rule 3650
Rule 3715
Rule 3734
Rubi steps \begin{align*} \text {integral}& = -\frac {\sqrt {e \cot (c+d x)}}{2 d e \left (a^2+a^2 \cot (c+d x)\right )}-\frac {\int \frac {-\frac {3 a^2 e}{2}+a^2 e \cot (c+d x)-\frac {1}{2} a^2 e \cot ^2(c+d x)}{\sqrt {e \cot (c+d x)} (a+a \cot (c+d x))} \, dx}{2 a^3 e} \\ & = -\frac {\sqrt {e \cot (c+d x)}}{2 d e \left (a^2+a^2 \cot (c+d x)\right )}+\frac {3 \int \frac {1+\cot ^2(c+d x)}{\sqrt {e \cot (c+d x)} (a+a \cot (c+d x))} \, dx}{4 a}-\frac {\int \frac {2 a^3 e \cot (c+d x)}{\sqrt {e \cot (c+d x)}} \, dx}{4 a^5 e} \\ & = -\frac {\sqrt {e \cot (c+d x)}}{2 d e \left (a^2+a^2 \cot (c+d x)\right )}-\frac {\int \frac {\cot (c+d x)}{\sqrt {e \cot (c+d x)}} \, dx}{2 a^2}+\frac {3 \text {Subst}\left (\int \frac {1}{\sqrt {-e x} (a-a x)} \, dx,x,-\cot (c+d x)\right )}{4 a d} \\ & = -\frac {\sqrt {e \cot (c+d x)}}{2 d e \left (a^2+a^2 \cot (c+d x)\right )}-\frac {\int \sqrt {e \cot (c+d x)} \, dx}{2 a^2 e}-\frac {3 \text {Subst}\left (\int \frac {1}{a+\frac {a x^2}{e}} \, dx,x,\sqrt {e \cot (c+d x)}\right )}{2 a d e} \\ & = -\frac {3 \arctan \left (\frac {\sqrt {e \cot (c+d x)}}{\sqrt {e}}\right )}{2 a^2 d \sqrt {e}}-\frac {\sqrt {e \cot (c+d x)}}{2 d e \left (a^2+a^2 \cot (c+d x)\right )}+\frac {\text {Subst}\left (\int \frac {\sqrt {x}}{e^2+x^2} \, dx,x,e \cot (c+d x)\right )}{2 a^2 d} \\ & = -\frac {3 \arctan \left (\frac {\sqrt {e \cot (c+d x)}}{\sqrt {e}}\right )}{2 a^2 d \sqrt {e}}-\frac {\sqrt {e \cot (c+d x)}}{2 d e \left (a^2+a^2 \cot (c+d x)\right )}+\frac {\text {Subst}\left (\int \frac {x^2}{e^2+x^4} \, dx,x,\sqrt {e \cot (c+d x)}\right )}{a^2 d} \\ & = -\frac {3 \arctan \left (\frac {\sqrt {e \cot (c+d x)}}{\sqrt {e}}\right )}{2 a^2 d \sqrt {e}}-\frac {\sqrt {e \cot (c+d x)}}{2 d e \left (a^2+a^2 \cot (c+d x)\right )}-\frac {\text {Subst}\left (\int \frac {e-x^2}{e^2+x^4} \, dx,x,\sqrt {e \cot (c+d x)}\right )}{2 a^2 d}+\frac {\text {Subst}\left (\int \frac {e+x^2}{e^2+x^4} \, dx,x,\sqrt {e \cot (c+d x)}\right )}{2 a^2 d} \\ & = -\frac {3 \arctan \left (\frac {\sqrt {e \cot (c+d x)}}{\sqrt {e}}\right )}{2 a^2 d \sqrt {e}}-\frac {\sqrt {e \cot (c+d x)}}{2 d e \left (a^2+a^2 \cot (c+d x)\right )}+\frac {\text {Subst}\left (\int \frac {1}{e-\sqrt {2} \sqrt {e} x+x^2} \, dx,x,\sqrt {e \cot (c+d x)}\right )}{4 a^2 d}+\frac {\text {Subst}\left (\int \frac {1}{e+\sqrt {2} \sqrt {e} x+x^2} \, dx,x,\sqrt {e \cot (c+d x)}\right )}{4 a^2 d}+\frac {\text {Subst}\left (\int \frac {\sqrt {2} \sqrt {e}+2 x}{-e-\sqrt {2} \sqrt {e} x-x^2} \, dx,x,\sqrt {e \cot (c+d x)}\right )}{4 \sqrt {2} a^2 d \sqrt {e}}+\frac {\text {Subst}\left (\int \frac {\sqrt {2} \sqrt {e}-2 x}{-e+\sqrt {2} \sqrt {e} x-x^2} \, dx,x,\sqrt {e \cot (c+d x)}\right )}{4 \sqrt {2} a^2 d \sqrt {e}} \\ & = -\frac {3 \arctan \left (\frac {\sqrt {e \cot (c+d x)}}{\sqrt {e}}\right )}{2 a^2 d \sqrt {e}}-\frac {\sqrt {e \cot (c+d x)}}{2 d e \left (a^2+a^2 \cot (c+d x)\right )}+\frac {\log \left (\sqrt {e}+\sqrt {e} \cot (c+d x)-\sqrt {2} \sqrt {e \cot (c+d x)}\right )}{4 \sqrt {2} a^2 d \sqrt {e}}-\frac {\log \left (\sqrt {e}+\sqrt {e} \cot (c+d x)+\sqrt {2} \sqrt {e \cot (c+d x)}\right )}{4 \sqrt {2} a^2 d \sqrt {e}}+\frac {\text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1-\frac {\sqrt {2} \sqrt {e \cot (c+d x)}}{\sqrt {e}}\right )}{2 \sqrt {2} a^2 d \sqrt {e}}-\frac {\text {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1+\frac {\sqrt {2} \sqrt {e \cot (c+d x)}}{\sqrt {e}}\right )}{2 \sqrt {2} a^2 d \sqrt {e}} \\ & = -\frac {3 \arctan \left (\frac {\sqrt {e \cot (c+d x)}}{\sqrt {e}}\right )}{2 a^2 d \sqrt {e}}-\frac {\arctan \left (1-\frac {\sqrt {2} \sqrt {e \cot (c+d x)}}{\sqrt {e}}\right )}{2 \sqrt {2} a^2 d \sqrt {e}}+\frac {\arctan \left (1+\frac {\sqrt {2} \sqrt {e \cot (c+d x)}}{\sqrt {e}}\right )}{2 \sqrt {2} a^2 d \sqrt {e}}-\frac {\sqrt {e \cot (c+d x)}}{2 d e \left (a^2+a^2 \cot (c+d x)\right )}+\frac {\log \left (\sqrt {e}+\sqrt {e} \cot (c+d x)-\sqrt {2} \sqrt {e \cot (c+d x)}\right )}{4 \sqrt {2} a^2 d \sqrt {e}}-\frac {\log \left (\sqrt {e}+\sqrt {e} \cot (c+d x)+\sqrt {2} \sqrt {e \cot (c+d x)}\right )}{4 \sqrt {2} a^2 d \sqrt {e}} \\ \end{align*}
Time = 1.60 (sec) , antiderivative size = 131, normalized size of antiderivative = 0.47 \[ \int \frac {1}{\sqrt {e \cot (c+d x)} (a+a \cot (c+d x))^2} \, dx=-\frac {3 e^{3/2} \arctan \left (\frac {\sqrt {e \cot (c+d x)}}{\sqrt {e}}\right )+\left (-e^2\right )^{3/4} \arctan \left (\frac {\sqrt {e \cot (c+d x)}}{\sqrt [4]{-e^2}}\right )-\left (-e^2\right )^{3/4} \text {arctanh}\left (\frac {\sqrt {e \cot (c+d x)}}{\sqrt [4]{-e^2}}\right )+\frac {e \sqrt {e \cot (c+d x)}}{1+\cot (c+d x)}}{2 a^2 d e^2} \]
[In]
[Out]
Time = 0.04 (sec) , antiderivative size = 197, normalized size of antiderivative = 0.70
method | result | size |
derivativedivides | \(-\frac {2 e^{3} \left (-\frac {\sqrt {2}\, \left (\ln \left (\frac {e \cot \left (d x +c \right )-\left (e^{2}\right )^{\frac {1}{4}} \sqrt {e \cot \left (d x +c \right )}\, \sqrt {2}+\sqrt {e^{2}}}{e \cot \left (d x +c \right )+\left (e^{2}\right )^{\frac {1}{4}} \sqrt {e \cot \left (d x +c \right )}\, \sqrt {2}+\sqrt {e^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {e \cot \left (d x +c \right )}}{\left (e^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {e \cot \left (d x +c \right )}}{\left (e^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{16 e^{3} \left (e^{2}\right )^{\frac {1}{4}}}+\frac {\frac {\sqrt {e \cot \left (d x +c \right )}}{2 e \cot \left (d x +c \right )+2 e}+\frac {3 \arctan \left (\frac {\sqrt {e \cot \left (d x +c \right )}}{\sqrt {e}}\right )}{2 \sqrt {e}}}{2 e^{3}}\right )}{d \,a^{2}}\) | \(197\) |
default | \(-\frac {2 e^{3} \left (-\frac {\sqrt {2}\, \left (\ln \left (\frac {e \cot \left (d x +c \right )-\left (e^{2}\right )^{\frac {1}{4}} \sqrt {e \cot \left (d x +c \right )}\, \sqrt {2}+\sqrt {e^{2}}}{e \cot \left (d x +c \right )+\left (e^{2}\right )^{\frac {1}{4}} \sqrt {e \cot \left (d x +c \right )}\, \sqrt {2}+\sqrt {e^{2}}}\right )+2 \arctan \left (\frac {\sqrt {2}\, \sqrt {e \cot \left (d x +c \right )}}{\left (e^{2}\right )^{\frac {1}{4}}}+1\right )-2 \arctan \left (-\frac {\sqrt {2}\, \sqrt {e \cot \left (d x +c \right )}}{\left (e^{2}\right )^{\frac {1}{4}}}+1\right )\right )}{16 e^{3} \left (e^{2}\right )^{\frac {1}{4}}}+\frac {\frac {\sqrt {e \cot \left (d x +c \right )}}{2 e \cot \left (d x +c \right )+2 e}+\frac {3 \arctan \left (\frac {\sqrt {e \cot \left (d x +c \right )}}{\sqrt {e}}\right )}{2 \sqrt {e}}}{2 e^{3}}\right )}{d \,a^{2}}\) | \(197\) |
[In]
[Out]
Result contains complex when optimal does not.
Time = 0.30 (sec) , antiderivative size = 1181, normalized size of antiderivative = 4.20 \[ \int \frac {1}{\sqrt {e \cot (c+d x)} (a+a \cot (c+d x))^2} \, dx=\text {Too large to display} \]
[In]
[Out]
\[ \int \frac {1}{\sqrt {e \cot (c+d x)} (a+a \cot (c+d x))^2} \, dx=\frac {\int \frac {1}{\sqrt {e \cot {\left (c + d x \right )}} \cot ^{2}{\left (c + d x \right )} + 2 \sqrt {e \cot {\left (c + d x \right )}} \cot {\left (c + d x \right )} + \sqrt {e \cot {\left (c + d x \right )}}}\, dx}{a^{2}} \]
[In]
[Out]
Exception generated. \[ \int \frac {1}{\sqrt {e \cot (c+d x)} (a+a \cot (c+d x))^2} \, dx=\text {Exception raised: ValueError} \]
[In]
[Out]
\[ \int \frac {1}{\sqrt {e \cot (c+d x)} (a+a \cot (c+d x))^2} \, dx=\int { \frac {1}{{\left (a \cot \left (d x + c\right ) + a\right )}^{2} \sqrt {e \cot \left (d x + c\right )}} \,d x } \]
[In]
[Out]
Time = 13.14 (sec) , antiderivative size = 366, normalized size of antiderivative = 1.30 \[ \int \frac {1}{\sqrt {e \cot (c+d x)} (a+a \cot (c+d x))^2} \, dx=\frac {\mathrm {atan}\left (\frac {4\,e^8\,\sqrt {e\,\mathrm {cot}\left (c+d\,x\right )}\,{\left (-\frac {1}{a^8\,d^4\,e^2}\right )}^{1/4}}{\frac {4\,e^8}{a^2\,d}+36\,a^2\,d\,e^9\,\sqrt {-\frac {1}{a^8\,d^4\,e^2}}}+\frac {36\,e^9\,\sqrt {e\,\mathrm {cot}\left (c+d\,x\right )}\,{\left (-\frac {1}{a^8\,d^4\,e^2}\right )}^{3/4}}{\frac {4\,e^8}{a^6\,d^3}+\frac {36\,e^9\,\sqrt {-\frac {1}{a^8\,d^4\,e^2}}}{a^2\,d}}\right )\,{\left (-\frac {1}{a^8\,d^4\,e^2}\right )}^{1/4}}{2}+\mathrm {atan}\left (\frac {e^8\,\sqrt {e\,\mathrm {cot}\left (c+d\,x\right )}\,{\left (-\frac {1}{256\,a^8\,d^4\,e^2}\right )}^{1/4}\,16{}\mathrm {i}}{\frac {4\,e^8}{a^2\,d}-576\,a^2\,d\,e^9\,\sqrt {-\frac {1}{256\,a^8\,d^4\,e^2}}}-\frac {e^9\,\sqrt {e\,\mathrm {cot}\left (c+d\,x\right )}\,{\left (-\frac {1}{256\,a^8\,d^4\,e^2}\right )}^{3/4}\,2304{}\mathrm {i}}{\frac {4\,e^8}{a^6\,d^3}-\frac {576\,e^9\,\sqrt {-\frac {1}{256\,a^8\,d^4\,e^2}}}{a^2\,d}}\right )\,{\left (-\frac {1}{256\,a^8\,d^4\,e^2}\right )}^{1/4}\,2{}\mathrm {i}-\frac {\sqrt {e\,\mathrm {cot}\left (c+d\,x\right )}}{2\,\left (a^2\,d\,e+a^2\,d\,e\,\mathrm {cot}\left (c+d\,x\right )\right )}-\frac {\mathrm {atan}\left (\frac {\sqrt {e\,\mathrm {cot}\left (c+d\,x\right )}\,1{}\mathrm {i}}{\sqrt {-e}}\right )\,3{}\mathrm {i}}{2\,a^2\,d\,\sqrt {-e}} \]
[In]
[Out]